;(function(window) {

  var svgSprite = '<svg>' +
    '' +
    '<symbol id="icon-1" viewBox="0 0 1024 1024">' +
    '' +
    '<path d="M128.005 302.974l386.971 420.571 381.019-422.746z"  ></path>' +
    '' +
    '</symbol>' +
    '' +
    '<symbol id="icon-lineleft" viewBox="0 0 1024 1024">' +
    '' +
    '<path d="M 256 512 l 512 512 v -238.016 l -273.92 -273.984 l 273.92 -273.984 v -237.951 l -512 511.936 Z"  ></path>' +
    '' +
    '</symbol>' +
    '' +
    '<symbol id="icon-chongzhi" viewBox="0 0 1024 1024">' +
    '' +
    '<path d="M508.160555 144.973836c-197.120496 0-357.391736 160.339802-357.391736 357.406063 0 197.042725 160.27124 357.422436 357.391736 357.422436 197.039655 0 357.39583-160.380734 357.39583-357.422436C865.555361 305.313637 705.20021 144.973836 508.160555 144.973836L508.160555 144.973836zM508.160555 831.16818c-181.335998 0-328.862983-147.553591-328.862983-328.787258 0-181.337021 147.526985-328.835354 328.862983-328.835354 181.254134 0 328.784188 147.499355 328.784188 328.835354C836.944743 683.613566 689.414689 831.16818 508.160555 831.16818L508.160555 831.16818zM509.640256 214.887139c-159.180396 0-288.219307 128.986723-288.219307 288.157909 0 159.104671 129.038912 288.089347 288.219307 288.089347 159.073972 0 288.075021-128.984676 288.075021-288.089347C797.715277 343.873862 668.714228 214.887139 509.640256 214.887139L509.640256 214.887139zM619.24556 502.087233l0 40.72554-86.213547 0 0 23.436782 86.213547 0 0 38.724976-86.213547 0 0 71.429843-45.944402 0 0-71.429843-86.694501 0L400.393109 566.249555l86.694501 0 0-23.436782-86.694501 0 0-40.72554 68.576865 0-85.088934-156.620084 51.14996 0 61.86193 115.808586c5.129834 9.636474 9.15859 18.037818 12.407588 25.533536 3.490497-7.270591 7.866155-16.474206 13.46671-27.520797l58.485019-113.822348 54.05615 0-84.692914 156.624177 68.629054 0L619.244536 502.087233zM619.24556 502.087233"  ></path>' +
    '' +
    '</symbol>' +
    '' +
    '</svg>'
  var script = function() {
    var scripts = document.getElementsByTagName('script')
    return scripts[scripts.length - 1]
  }()
  var shouldInjectCss = script.getAttribute("data-injectcss")

  /**
   * document ready
   */
  var ready = function(fn) {
    if (document.addEventListener) {
      if (~["complete", "loaded", "interactive"].indexOf(document.readyState)) {
        setTimeout(fn, 0)
      } else {
        var loadFn = function() {
          document.removeEventListener("DOMContentLoaded", loadFn, false)
          fn()
        }
        document.addEventListener("DOMContentLoaded", loadFn, false)
      }
    } else if (document.attachEvent) {
      IEContentLoaded(window, fn)
    }

    function IEContentLoaded(w, fn) {
      var d = w.document,
        done = false,
        // only fire once
        init = function() {
          if (!done) {
            done = true
            fn()
          }
        }
        // polling for no errors
      var polling = function() {
        try {
          // throws errors until after ondocumentready
          d.documentElement.doScroll('left')
        } catch (e) {
          setTimeout(polling, 50)
          return
        }
        // no errors, fire

        init()
      };

      polling()
        // trying to always fire before onload
      d.onreadystatechange = function() {
        if (d.readyState == 'complete') {
          d.onreadystatechange = null
          init()
        }
      }
    }
  }

  /**
   * Insert el before target
   *
   * @param {Element} el
   * @param {Element} target
   */

  var before = function(el, target) {
    target.parentNode.insertBefore(el, target)
  }

  /**
   * Prepend el to target
   *
   * @param {Element} el
   * @param {Element} target
   */

  var prepend = function(el, target) {
    if (target.firstChild) {
      before(el, target.firstChild)
    } else {
      target.appendChild(el)
    }
  }

  function appendSvg() {
    var div, svg

    div = document.createElement('div')
    div.innerHTML = svgSprite
    svgSprite = null
    svg = div.getElementsByTagName('svg')[0]
    if (svg) {
      svg.setAttribute('aria-hidden', 'true')
      svg.style.position = 'absolute'
      svg.style.width = 0
      svg.style.height = 0
      svg.style.overflow = 'hidden'
      prepend(svg, document.body)
    }
  }

  if (shouldInjectCss && !window.__iconfont__svg__cssinject__) {
    window.__iconfont__svg__cssinject__ = true
    try {
      document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>");
    } catch (e) {
      console && console.log(e)
    }
  }

  ready(appendSvg)


})(window)